import React from 'react';
import {Card, Spin, Empty} from 'antd';

function RightInfo({infoData, selectKey, spinning}) {
  console.log(selectKey);
  return (
    selectKey ?
      <Spin spinning={spinning}>
        <div style={{padding: '30px'}}>
          <Card title={'基本信息'} bordered={false} style={{width: 300}}>
            <p>
              <span>名称：</span>
              <i>{infoData.cate_title}</i>
            </p>
            <p>
              <span>编码：</span>
              <i>{infoData.cate_code}</i>
            </p>
          </Card>
        </div>
      </Spin>
      :
      <div className='emptyBox'>
        <Empty description='暂无数据...'/>
      </div>
  );
}

export default RightInfo;
